<!DOCTYPE html>
<div>The test passes if it doesn't crash</div>
<br>
<dialog id="dialog" style="position: relative">
<input>
<script>
    dialog.show();
    document.body.offsetTop; // force layout
    dialog.close();
</script>